[2017_HackCon] [MISC] Rotate it, High Bass, File, Needle, ALL CAPS, RSA-1, flag.txt, Welcome, Keep talking¶
문제내용 (Rotate)¶
Found this weird code can you make something out of it? q4ex{ju0_tvir$_pn3fne_va_PGS???}p0qr
문제 풀이¶
rot13을 통해 문제 해결
문제내용 (High Bass)¶
The secret code just became longer VGhpcyB3YXMgaW4gYmFzZS02NDogZDRya3t0aGF0XyRpbXBsXzNuMHVnaDRfVX1jMGRl
문제 풀이¶
Base64 decode를 통해 문제 해결
문제내용 (Files)¶
This file is weird, what does it do?
문제 풀이¶
elf 파일 실행하면 문제 해결
문제 풀이¶
$ string text.txt |grep d4rk
문제내용 (ALL CAPS)¶
Another cipher? You got to be kidding me. OF EKBHMGUKZHJB, Z LWALMOMWMOGF EOHJTK OL Z DTMJGX GY TFEGXOFU AB NJOEJ WFOML GY HSZOFMTVM ZKT KTHSZETX NOMJ EOHJTKMTVM, ZEEGKXOFU MG Z YOVTX LBLMTD; MJT "WFOML" DZB AT LOFUST STMMTKL (MJT DGLM EGDDGF), HZOKL GY STMMTKL, MKOHSTML GY STMMTKL, DOVMWKTL GY MJT ZAGRT, ZFX LG YGKMJ. MJT KTETORTK XTEOHJTKL MJT MTVM AB HTKYGKDOFU MJT OFRTKLT LWALMOMWMOGF. MJZFQL YGK KTZXOFU MJZM, JTKT'L BGWK YSZU: X4KQ{MKB_YZEEJ3_OYMJOL_MGG_LODHTS}E0XT
문제 풀이¶
문제내용 (RSA-1)¶
Go read about RSA and how it works, then try to solve this.
p = 152571978722786084351886931023496370376798999987339944199021200531651275691099103449347349897964635706112525455731825020638894818859922778593149300143162720366876072994268633705232631614015865065113917174134807989294330527442191261958994565247945255072784239755770729665527959042883079517088277506164871850439
q = 147521976719041268733467288485176351894757998182920217874425681969830447338980333917821370916051260709883910633752027981630326988193070984505456700948150616796672915601007075205372397177359025857236701866904448906965019938049507857761886750656621746762474747080300831166523844026738913325930146507823506104359
c = 8511718779884002348933302329129034304748857434273552143349006561412761982574325566387289878631104742338583716487885551483795770878333568637517519439482152832740954108568568151340772337201643636336669393323584931481091714361927928549187423697803637825181374486997812604036706926194198296656150267412049091252088273904913718189248082391969963422192111264078757219427099935562601838047817410081362261577538573299114227343694888309834727224639741066786960337752762092049561527128427933146887521537659100047835461395832978920369260824158334744269055059394177455075510916989043073375102773439498560915413630238758363023648
e = 65537
문제 풀이¶
sage: N=p*q
sage: phi = (p-1)*(q-1)
sage: d = inverse_mod(e, phi)
sage: decrypted = Mod(c, N) ** d
sage: flag = hex(Integer(decrypted)).decode('hex')
sage: print(flag)
문제내용 (flag.txt)¶
Even google won't be able to find the flag. Still you can try if you want: http://defcon.org.in:6061/
문제 풀이¶
해당 페이지에 접속하면 robot관련 힌트를 주는데 robots.txt 파일이 존재하는 지 확인한다. 확인하면 특정 디렉토리에 대해 Disallow가 되어 있는데 해당 디렉토리에 flag.txt를 읽으면 플래그가 출력된다.